<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>3.字面量创建正则表达式</title>
    </head>
    <body>
        <script type="text/javascript">
            // 字面量这种写法用的比较多
            let hd = "houdunren.com";
            let a='u'
            // console.log(/a/.test(hd))
            console.log(eval(`/${a}/`).test(hd));
        </script>
    </body>
</html>
